package br.com.mizzu.controllers;

import java.util.ArrayList;
import java.util.List;

import br.com.mizzu.annotations.Action;
import br.com.mizzu.annotations.Controller;
import br.com.mizzu.util.ControllerSupport;

@Controller(nome="index")
public class IndexController implements ControllerSupport{
	private String frase;
	private String [] names = new String []{ "A" , "B" , "C" , "D" };
	private List<Object> lista;
	
	@Action
	@Override
	public String execute() {
		lista = new ArrayList<Object>();
		lista.add(new Endereco("rua 1",new Observacao("obs 1")));
		lista.add(new Endereco("rua 2",new Observacao("obs 2")));
		lista.add(new Endereco("rua 3",new Observacao("obs 3")));
		System.out.println("estou no index");
		//this.frase = "perfeito!";
		return "index";
	}

	public List<Object> getLista() {
		return lista;
	}

	public void setLista(List<Object> lista) {
		this.lista = lista;
	}

	public String getFrase() {
		return frase;
	}

	public void setFrase(String frase) {
		this.frase = frase;
	}

	public String [] getNames() {
		return names;
	}

	public void setNames(String [] names) {
		this.names = names;
	}	
}
